package com.ruoyi.test.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.test.mapper.TmpTstMapper;
import com.ruoyi.test.domain.TmpTst;
import com.ruoyi.test.service.ITmpTstService;

/**
 * 测试Service业务层处理
 * 
 * @author linkaituo
 * @date 2024-08-10
 */
@Service
public class TmpTstServiceImpl implements ITmpTstService 
{
    @Autowired
    private TmpTstMapper tmpTstMapper;

    /**
     * 查询测试
     * 
     * @param id 测试主键
     * @return 测试
     */
    @Override
    public TmpTst selectTmpTstById(String id)
    {
        return tmpTstMapper.selectTmpTstById(id);
    }

    /**
     * 查询测试列表
     * 
     * @param tmpTst 测试
     * @return 测试
     */
    @Override
    public List<TmpTst> selectTmpTstList(TmpTst tmpTst)
    {
        return tmpTstMapper.selectTmpTstList(tmpTst);
    }

    /**
     * 新增测试
     * 
     * @param tmpTst 测试
     * @return 结果
     */
    @Override
    public int insertTmpTst(TmpTst tmpTst)
    {
        tmpTst.setCreateTime(DateUtils.getNowDate());
        return tmpTstMapper.insertTmpTst(tmpTst);
    }

    /**
     * 修改测试
     * 
     * @param tmpTst 测试
     * @return 结果
     */
    @Override
    public int updateTmpTst(TmpTst tmpTst)
    {
        tmpTst.setUpdateTime(DateUtils.getNowDate());
        return tmpTstMapper.updateTmpTst(tmpTst);
    }

    /**
     * 批量删除测试
     * 
     * @param ids 需要删除的测试主键
     * @return 结果
     */
    @Override
    public int deleteTmpTstByIds(String[] ids)
    {
        return tmpTstMapper.deleteTmpTstByIds(ids);
    }

    /**
     * 删除测试信息
     * 
     * @param id 测试主键
     * @return 结果
     */
    @Override
    public int deleteTmpTstById(String id)
    {
        return tmpTstMapper.deleteTmpTstById(id);
    }
}
